package jwdt.xadmin.goods.bean;

import java.io.Serializable;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_goods", keys={"goodsid"}, comment="物品管理")
public class TGoods implements Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="goodsid", comment="物品ID")
	private Integer goodsid;
	
	@Column(value="classid", comment="分类ID")
	private Integer classid;
	
	@Column(value="name", comment="名称")
	private String name;
	
	@Column(value="num", comment="数量")
	private Integer num;
	
	@Column(value="price", comment="价格")
	private Double price;
	
	@Column(value="dt", comment="时间")
	private String dt;
	
	@Column(value="zt", comment="状态")
	private Integer zt;

	public Integer getGoodsid() {
		return goodsid;
	}

	public void setGoodsid(Integer goodsid) {
		this.goodsid = goodsid;
	}
	
	public Integer getClassid() {
		return classid;
	}

	public void setClassid(Integer classid) {
		this.classid = classid;
	}

	public String getClassname() {
		TGoodsClass gc = (TGoodsClass)Jdb.get().get(TGoodsClass.class, classid);
		if(gc == null) {
			return "";
		}
		return gc.getName();
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getDt() {
		return dt;
	}

	public void setDt(String dt) {
		this.dt = dt;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}
	
	
	
}
